package vue;

import model.EErrorPopUp;
import model.session.CNFUse;
import controller.IController;
import controller.ISessionManager;

/**
 * Interface for implementing a GUI to igsat.
 * 
 * @author GRONOWSKI Stephane svan001@aol.com
 * 
 *         igsat 2010
 * 
 */
public interface IIG {

	/**
	 * Open a session with the specified cnf.
	 * 
	 * @param cnf
	 *            the cnf
	 * @param manager
	 *            the session manager
	 * @return the session manager associate to the new session created, null if a problem occur.
	 */
	public IIGSessionManager openSession(CNFUse cnf, ISessionManager manager);

	/**
	 * Close the session of the specified sessionManager.
	 * 
	 * @param session
	 *            the session manager
	 */
	public void closeSession(ISessionManager session);

	/**
	 * Create a pop up for the specified type and message.
	 * 
	 * @param type
	 *            type of message.
	 * @param message
	 *            additionnal message.
	 */
	public void showErrorPopup(EErrorPopUp type, String message);

	/**
	 * Change the controller of the gui.
	 * 
	 * @param ctrl
	 *            the new controller.
	 */
	public void setController(IController ctrl);

	/**
	 * Get the controller of the gui.
	 * 
	 * @return the controller of the gui.
	 */
	public IController getController();

	/**
	 * Throw a popup that ask a question to the user that is supposed to be yes or no
	 * 
	 * @param question
	 *            the question to ask
	 * @return true if yes, false if no
	 */
	public boolean yesNoQuestionPopup(String question);


}
